#include <iostream>
#include <vector>

using namespace std;

int main()
{
    vector<int> vec{1, 2, 3, 4, 5, 6};
    int *p = &vec[0];
    vec.push_back(7);
    *p = 0;
    for (auto i : vec)
    {
        cout << i << ' ';
    }
    cout << endl;
}